home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java Primer Plus
/
Java Primer Plus (Waite Group Proess)(1996).iso
/
chapter11
/
debug.java
< prev
next >
Wrap
Text File
|
1995-12-31
|
450b
|
30 lines
/* Just made for debugging */
class righttriangle {
private float height,width,hypot;
public righttriangle(float h,float w) {
height = h;
width = w;
hypot = (float)Math.sqrt(w*w + h*h);
}
public float hypotenuse() {
return hypot;
}
}
class debug {
public static void main (String args[]) {
righttriangle T = new righttriangle(3F,4F);
System.out.println(T.hypotenuse());
}
}